package com.qt.receiver;

import com.qt.utils.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author pgw
 * @version 1.0
 * @description
 * @date Create by 2023/9/25 20:50
 */
public abstract class AbstractReceiver {

    @Autowired
    private RedisUtil redisUtil;

    public void handleWaitingTask(String...queues){
        for(String queue : queues){
            String task = getTaskByReids(queue);
            if(task != null){
                //处理
                handleJudgeTask(task, queue);
            }
        }
    }

    public  abstract  void handleJudgeTask(String task ,String queueName);

    public abstract  String getTaskByReids(String queue);
}
